package com.zhz.mall.common.exception;

import com.zhz.mall.common.api.IErrorCode;
import lombok.Getter;

/**
 * 禁止异常
 * @author zhouhengzhe
 */
@Getter
public class ForbiddenException extends RuntimeException {

    private IErrorCode errorCode;

    public ForbiddenException(String message) {
        super(message);
    }

    public ForbiddenException(IErrorCode errorCode) {
        super(errorCode.getMessage());
        this.errorCode = errorCode;
    }


}